///////////////////////////////////////////////////////////
///////////////// Have an itch? Scratch it! ///////////////
///////////////////////// SCRATCH /////////////////////////
/////////////////////  A MUD  Server   ////////////////////
///////////////////// By: Jared Devall ////////////////////
/////////////////////      Thanks:     ////////////////////
/////////////////////  DIKU/Merc/ROM   ////////////////////
///////////////////// Aetas/Deus Gang  ////////////////////
/////////////////////       Beej       ////////////////////
///////////////////////////////////////////////////////////

#ifndef __COMMANDTABLE_H_
#define __COMMANDTABLE_H_

#include "definitions.h"
#include <list>
#include "character.h"
#include "commands.h"

/////////////////////////////// regular commands //////////////////////////////
// The Command Table
class CommandTable {
	public:
		std::list< Command* > _commands;
		CommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static CommandTable& Instance();
};

// Our singleton instance
inline CommandTable& CommandTable::Instance() {
	static CommandTable instance;
	return instance;
}

/////////////////////////////// nedit commands //////////////////////////////
// The Command Table
class nCommandTable {
	public:
		std::list< Command* > _commands;
		nCommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static nCommandTable& Instance();
};

// Our singleton instance
inline nCommandTable& nCommandTable::Instance() {
	static nCommandTable instance;
	return instance;
}

/////////////////////////////// aedit commands //////////////////////////////
// The Command Table
class aCommandTable {
	public:
		std::list< Command* > _commands;
		aCommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static aCommandTable& Instance();
};

// Our singleton instance
inline aCommandTable& aCommandTable::Instance() {
	static aCommandTable instance;
	return instance;
}

/////////////////////////////// medit commands //////////////////////////////
// The Command Table
class mCommandTable {
	public:
		std::list< Command* > _commands;
		mCommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static mCommandTable& Instance();
};

// Our singleton instance
inline mCommandTable& mCommandTable::Instance() {
	static mCommandTable instance;
	return instance;
}

/////////////////////////////// oedit commands //////////////////////////////
// The Command Table
class oCommandTable {
	public:
		std::list< Command* > _commands;
		oCommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static oCommandTable& Instance();
};

// Our singleton instance
inline oCommandTable& oCommandTable::Instance() {
	static oCommandTable instance;
	return instance;
}


/////////////////////////////// redit commands //////////////////////////////
// The Command Table
class rCommandTable {
	public:
		std::list< Command* > _commands;
		rCommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static rCommandTable& Instance();
};

// Our singleton instance
inline rCommandTable& rCommandTable::Instance() {
	static rCommandTable instance;
	return instance;
}

/////////////////////////////// pedit commands //////////////////////////////
// The Command Table
class pCommandTable {
	public:
		std::list< Command* > _commands;
		pCommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static pCommandTable& Instance();
};

// Our singleton instance
inline pCommandTable& pCommandTable::Instance() {
	static pCommandTable instance;
	return instance;
}

/////////////////////////////// vedit commands //////////////////////////////
// The Command Table
class vCommandTable {
	public:
		std::list< Command* > _commands;
		vCommandTable();
		bool Execute( Character*, const std::string& );
		bool LoadCommands( void );
		bool LoadDisabledCommands( void );
		Command* FindCommand( Character*, const std::string&, bool shortcut );
		static vCommandTable& Instance();
};

// Our singleton instance
inline vCommandTable& vCommandTable::Instance() {
	static vCommandTable instance;
	return instance;
}



#endif // __commandtable_h
